<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>字典管理</title>
</head>
<style>
</style>
<body>
	<div class="layui-row layui-col-space15 layui-anim layui-anim-upbit">
	    <div class="layui-col-md12">
	    	<div class="layui-card">
	        	<div class="layui-card-header">
					<i class="layui-icon layui-icon-location" style="color: #c5b225;"></i>
					系统管理 > 字典管理
        		</div> 
        		<div class="layui-card-body">
					<!-- 右边表格 -->
					<table id="data_table" class="layui-hide" lay-filter="data_table"></table>
	        	</div>
      		</div>
    	</div>
    </div>
    <!-- 查询 -->
	<form class="layui-form" id="search_form" action="" lay-filter="searchForm"  style="padding: 20px 10px 10px;display: none">
        <div class="layui-form-item">
	        <div class="layui-inline">
	            <label class="layui-form-label">字典名称</label>
	            <div class="layui-input-inline">
	                <input type="text" name="dictName"  placeholder="请输入名称关键字"  autocomplete="off"  class="layui-input">
	        	</div>
	        </div>
	        <div class="layui-inline">
	            <label class="layui-form-label">字典编码</label>
	            <div class="layui-input-inline">
	                <input type="text" name="dictCode"  placeholder="请输入关键字"  autocomplete="off"  class="layui-input">
	        	</div>
	        </div>
	        <div class="layui-inline">
	            <label class="layui-form-label">标签类型</label>
	            <div class="layui-input-inline">
	                <select name="dictType">
		                <option value="">请选择</option>
						<option value="1">单选框</option>
						<option value="2">复选框</option>
						<option value="3">下拉框</option>
		            </select>
	        	</div>
	        </div>
	        <div class="layui-inline" style="text-align: center;">
	            <a lay-submit  class="layui-btn lay-close-btn"  lay-filter="submitSearch">查询</a>
	    	</div>
    	</div>
    </form>
    <!-- 新增编辑表单 -->
	<form class="layui-form" id="data_form"  action="" lay-filter="data_form" style="padding:10px;display: none;">
		<fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
		  <legend>基本信息</legend>
		</fieldset>
		<input type="text" name="id" class="layui-input" style="display: none">
		<div class="layui-form-item">
			<label class="layui-form-label req">字典名称</label>
			<div class="layui-input-block">
				<input type="text" name="dictName" placeholder="请输入名称" lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label req">字典编码</label>
			<div class="layui-input-block">
				<input type="text" name="dictCode" placeholder="请输入编码" lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label req">标签类型</label>
			<div class="layui-input-block">
				<select name="dictType" lay-verify="required" >
	                <option value="">请选择</option>
					<option value="1">单选框</option>
					<option value="2">复选框</option>
					<option value="3">下拉框</option>
	            </select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">备注</label>
			<div class="layui-input-block">
				<textarea placeholder="请输入内容" class="layui-textarea" name="remarks"></textarea>
			</div>
		</div>
		<br>
		<div class="layui-form-item" style="text-align: center;">
			<a class="layui-btn lay-submit-btn" lay-submit="" lay-filter="submitForm">立即提交</a>
			<a class="layui-btn layui-btn-primary lay-close-btn">关闭</a>
		</div>
	</form>
	
	 <!-- 字典设置 -->
	<form class="layui-form" id="setting_form"  action="" lay-filter="setting_form" style="padding:10px;display: none;">
		<fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
		  <legend>字典参数设置</legend>
		</fieldset>
		<div class="layui-form-item">
			<table id="setting_table" class="layui-hide" lay-filter="setting_table"></table>
		</div>
		<br>
		<div class="layui-form-item" style="text-align: center;">
			<a class="layui-btn layui-btn-primary lay-close-btn">关闭</a>
		</div>
	</form>
	<!-- 新增编辑参数设置表单 -->
	<form class="layui-form" id="setting_data_form"  action="" lay-filter="setting_data_form" style="padding:10px;display: none;">
		<fieldset class="layui-elem-field layui-field-title" style="color:#89b586;">
		  <legend>基本信息</legend>
		</fieldset>
		<input type="text" name="id" class="layui-input" style="display: none">
		<div class="layui-form-item">
			<label class="layui-form-label req">参数编码</label>
			<div class="layui-input-block">
				<input type="text" name="code" placeholder="请输入编码" lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label req">参数名称</label>
			<div class="layui-input-block">
				<input type="text" name="remarks" placeholder="请输入名称" lay-verify="required" class="layui-input">
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">颜色</label>
			<div class="layui-input-block">
				<div class="layui-input-inline" style="width: 120px;">
			        <input type="text" value="" placeholder="请选择颜色" class="layui-input" name="dictColor" id="color-form-input">
			    </div>
			    <div class="layui-inline" style="left: -11px;">
			   		<div id="color-form"></div>
			    </div>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label req">状态</label>
			<div class="layui-input-block">
				<select name="state" lay-verify="required" >
					<option value="0" selected="selected">使用</option>
					<option value="1">禁用</option>
	            </select>
			</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label req">排序号</label>
			<div class="layui-input-block">
				<input type="text" name="sort" placeholder="请输入排序号" lay-verify="required|number" class="layui-input">
			</div>
		</div>
		<br>
		<div class="layui-form-item" style="text-align: center;">
			<a class="layui-btn lay-submit-btn" lay-submit="" lay-filter="submitSettingForm">立即提交</a>
			<a class="layui-btn layui-btn-primary lay-close-btn">关闭</a>
		</div>
	</form>
</body>
<script type="text/html" id="toolRow">
	<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
	<a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
	<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="setting">字典设置</a>
</script>
<script type="text/html" id="toolberLeft">
	<div class="layui-form">
		<a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="add" style="margin-left: 5px;"><i class="layui-icon">&#xe654;</i>新增</a>
		<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="delete" style="margin-left: 5px;"><i class="layui-icon">&#xe640;</i>删除</a>
		<a class="layui-btn layui-btn-sm" lay-event="search" style="margin-left: 5px;"><i class="layui-icon">&#xe615;</i>搜索</a>
	</div>
</script>

<!-- 字典参数设置 -->
<script type="text/html" id="toolRowSetting">
	<a class="lay-row-a" lay-event="edit">编辑</a>
	<a class="lay-row-a" lay-event="del">删除</a>
</script>
<script type="text/html" id="toolberLeftSetting">
	<div class="layui-form">
		<a class="layui-btn layui-btn-sm layui-btn-primary" lay-event="add" style="margin-left: 5px;"><i class="layui-icon">&#xe654;</i>新增</a>
	</div>
</script>
<script type="text/html" id="switchRow">
    <input type="checkbox" tid="{{d.id}}" {{d.state==0?"checked":""}} name="state" lay-skin="switch" lay-filter="stateSwitch" lay-text="启用|禁用">
</script>

<jsp:include page="../load.jsp"></jsp:include>
<script src="${projectPath}/js/sys/dict.js?v=${cache}"></script>
</html>
